// $codepro.audit.disable
/**
 * License under GNU's GPL 
 * NurseGui.java 
 */

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.Scanner;
import java.io.*;
/**
 * The GUI for a Nurse user
 * @author Team 9
 *
 */
public class NurseGui extends JTabbedPane {
	public JTabbedPane tp;
	
	private JFrame frame;
	
	private JTextField textField;
	
	private JTextField textField_1;
	
	private JTextField textField_2;
	
	private JTextField textField_3;
	
	private JTextField textField_4;
	
	private JTextField textField_5;
	
	private JTextField textField_6;
	
	private JTextField textField_7;
	
	private JTextField textField_8;
	
	private JTextField textField_9;
	
	private JTextField textField_10;
	
	private JTextField textField_11;
	
	/**
	 * the constructor for a Nurse user
	 */
	public NurseGui() {
		initialize();
	}
	
	/**
	 * initialize method that actually makes the GUI,
	 * constructor calls this method
	 */
	public void initialize() {
		frame = new JFrame("Nurse");
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setPreferredSize(new Dimension(800, 600));

		// 4 main tabs
		JPanel patients = new JPanel();
		JPanel appointment = new JPanel();
		JPanel logout = new JPanel();
		JPanel main = new JPanel();
		// ------------------------

		// Patients tab
		// ------------------------

		// Appointment tab
		// ------------------------

		// Logout tab
		// ------------------------

		// Main tab
		// ------------------------

		addTab("Main", main);

		JLabel lblNewLabel_1 = new JLabel("Welcome!");
		main.add(lblNewLabel_1);
		addTab("Appointments", appointment);
		appointment.setLayout(null);

		JLabel label_13 = new JLabel("Appointments for the day-");
		label_13.setBounds(349, 11, 170, 20);
		appointment.add(label_13);

		JTextArea textArea = new JTextArea();
		textArea.setEditable(false);
		textArea.setBounds(211, 32, 410, 429);
		for (int i = 0; i < Gui.getAppointArray().size(); i++) {
			textArea.append(Gui.getAppointArray().get(i).toString() + "\n");
		}
		appointment.add(textArea);
		addTab("Patients", patients);
		patients.setLayout(null);

		JButton button = new JButton("View");
		button.setBounds(272, 35, 89, 23);
		patients.add(button);

		JButton button_1 = new JButton("Edit");
		button_1.setBounds(221, 61, 89, 23);
		patients.add(button_1);

		JButton button_2 = new JButton("Delete");
		button_2.setBounds(317, 61, 89, 23);
		patients.add(button_2);

		JLabel label = new JLabel("Select Account");
		label.setBounds(10, 11, 103, 14);
		patients.add(label);

		JTextPane txtpnAccounts = new JTextPane();
		txtpnAccounts.setText("accounts");
		txtpnAccounts.setBounds(10, 35, 201, 482);
		patients.add(txtpnAccounts);

		JEditorPane editorPane = new JEditorPane();
		editorPane.setBounds(-27, 212, 106, 20);
		patients.add(editorPane);

		JLabel lblEditFirstName = new JLabel("Edit First Name");
		lblEditFirstName.setBounds(221, 95, 89, 14);
		patients.add(lblEditFirstName);

		JLabel lblEditLastName = new JLabel("Edit Last Name");
		lblEditLastName.setBounds(221, 120, 89, 14);
		patients.add(lblEditLastName);

		JLabel lblEditUserName = new JLabel("Edit User Name");
		lblEditUserName.setBounds(221, 145, 89, 14);
		patients.add(lblEditUserName);

		JLabel lblEditPassword = new JLabel("Edit Password");
		lblEditPassword.setBounds(221, 170, 89, 14);
		patients.add(lblEditPassword);

		JLabel lblNewPatient = new JLabel("New Patient");
		lblNewPatient.setBounds(221, 229, 89, 14);
		patients.add(lblNewPatient);

		JLabel lblFirstName = new JLabel("First Name");
		lblFirstName.setBounds(221, 254, 89, 14);
		patients.add(lblFirstName);

		JLabel lblLastName = new JLabel("Last Name");
		lblLastName.setBounds(221, 279, 89, 14);
		patients.add(lblLastName);

		JLabel lblUserName = new JLabel("User Name");
		lblUserName.setBounds(221, 304, 89, 14);
		patients.add(lblUserName);

		JLabel lblLastName_1 = new JLabel("Last Name");
		lblLastName_1.setBounds(221, 329, 89, 14);
		patients.add(lblLastName_1);

		JLabel lblMessage = new JLabel("Message 1");
		lblMessage.setBounds(221, 195, 89, 14);
		patients.add(lblMessage);

		JLabel lblMessage_1 = new JLabel("Message 2");
		lblMessage_1.setBounds(221, 354, 89, 14);
		patients.add(lblMessage_1);

		textField = new JTextField();
		textField.setBounds(317, 92, 86, 20);
		patients.add(textField);
		textField.setColumns(10);

		textField_1 = new JTextField();
		textField_1.setBounds(317, 117, 86, 20);
		patients.add(textField_1);
		textField_1.setColumns(10);

		textField_2 = new JTextField();
		textField_2.setBounds(317, 142, 86, 20);
		patients.add(textField_2);
		textField_2.setColumns(10);

		textField_3 = new JTextField();
		textField_3.setBounds(317, 167, 86, 20);
		patients.add(textField_3);
		textField_3.setColumns(10);

		textField_4 = new JTextField();
		textField_4.setBounds(317, 251, 86, 20);
		patients.add(textField_4);
		textField_4.setColumns(10);

		textField_5 = new JTextField();
		textField_5.setBounds(317, 276, 86, 20);
		patients.add(textField_5);
		textField_5.setColumns(10);

		textField_6 = new JTextField();
		textField_6.setBounds(317, 301, 86, 20);
		patients.add(textField_6);
		textField_6.setColumns(10);

		textField_7 = new JTextField();
		textField_7.setBounds(317, 326, 86, 20);
		patients.add(textField_7);
		textField_7.setColumns(10);

		JButton btnCreate = new JButton("Create");
		btnCreate.setBounds(317, 350, 89, 23);
		patients.add(btnCreate);

		JLabel label_1 = new JLabel("Doctor:");
		label_1.setBounds(409, 36, 304, 14);
		patients.add(label_1);

		JLabel label_2 = new JLabel("Treatment Record For Appointment on:");
		label_2.setBounds(409, 11, 304, 14);
		patients.add(label_2);

		JLabel label_3 = new JLabel("Nurse:");
		label_3.setBounds(409, 61, 300, 14);
		patients.add(label_3);

		JLabel label_4 = new JLabel("BP:");
		label_4.setBounds(409, 86, 46, 14);
		patients.add(label_4);

		JLabel label_5 = new JLabel("Height:");
		label_5.setBounds(409, 109, 46, 14);
		patients.add(label_5);

		textField_8 = new JTextField();
		textField_8.setEditable(false);
		textField_8.setColumns(10);
		textField_8.setBounds(466, 75, 86, 20);
		patients.add(textField_8);

		textField_9 = new JTextField();
		textField_9.setEditable(false);
		textField_9.setColumns(10);
		textField_9.setBounds(466, 103, 86, 20);
		patients.add(textField_9);

		JLabel label_6 = new JLabel("Tempurature:");
		label_6.setBounds(573, 101, 100, 14);
		patients.add(label_6);

		JLabel label_7 = new JLabel("Weight:");
		label_7.setBounds(573, 78, 76, 14);
		patients.add(label_7);

		textField_10 = new JTextField();
		textField_10.setEditable(false);
		textField_10.setColumns(10);
		textField_10.setBounds(683, 77, 86, 20);
		patients.add(textField_10);

		textField_11 = new JTextField();
		textField_11.setEditable(false);
		textField_11.setColumns(10);
		textField_11.setBounds(683, 100, 86, 20);
		patients.add(textField_11);

		JLabel label_8 = new JLabel("Chief Complaints:");
		label_8.setBounds(409, 138, 136, 14);
		patients.add(label_8);

		JTextPane textPane = new JTextPane();
		textPane.setText(" ");
		textPane.setEditable(false);
		textPane.setBounds(409, 157, 353, 40);
		patients.add(textPane);

		JLabel label_9 = new JLabel("Diagnosis:");
		label_9.setBounds(409, 208, 89, 14);
		patients.add(label_9);

		JTextPane textPane_1 = new JTextPane();
		textPane_1.setText(" ");
		textPane_1.setEditable(false);
		textPane_1.setBounds(409, 228, 353, 40);
		patients.add(textPane_1);

		JLabel label_10 = new JLabel("Doctor's Orders-");
		label_10.setBounds(409, 279, 108, 14);
		patients.add(label_10);

		JLabel label_11 = new JLabel("Lab Work:");
		label_11.setBounds(409, 304, 89, 14);
		patients.add(label_11);

		JCheckBox checkBox = new JCheckBox("Blood Test");
		checkBox.setEnabled(false);
		checkBox.setBounds(469, 300, 101, 23);
		patients.add(checkBox);

		JCheckBox checkBox_1 = new JCheckBox("Throat Culture");
		checkBox_1.setEnabled(false);
		checkBox_1.setBounds(469, 329, 140, 23);
		patients.add(checkBox_1);

		JCheckBox checkBox_2 = new JCheckBox("X-Ray");
		checkBox_2.setEnabled(false);
		checkBox_2.setBounds(566, 300, 97, 23);
		patients.add(checkBox_2);

		JCheckBox checkBox_3 = new JCheckBox("MRI");
		checkBox_3.setEnabled(false);
		checkBox_3.setBounds(665, 300, 97, 23);
		patients.add(checkBox_3);

		JCheckBox checkBox_4 = new JCheckBox("Lumbar Puncture");
		checkBox_4.setEnabled(false);
		checkBox_4.setBounds(611, 329, 177, 23);
		patients.add(checkBox_4);

		JLabel label_12 = new JLabel("Prescriptions:");
		label_12.setBounds(409, 359, 108, 14);
		patients.add(label_12);

		JCheckBox checkBox_5 = new JCheckBox("Ibuprofen");
		checkBox_5.setEnabled(false);
		checkBox_5.setBounds(469, 380, 97, 23);
		patients.add(checkBox_5);

		JCheckBox checkBox_6 = new JCheckBox("Keflex");
		checkBox_6.setEnabled(false);
		checkBox_6.setBounds(566, 381, 97, 23);
		patients.add(checkBox_6);

		JCheckBox checkBox_7 = new JCheckBox("Zyrtec");
		checkBox_7.setEnabled(false);
		checkBox_7.setBounds(566, 355, 97, 23);
		patients.add(checkBox_7);

		JCheckBox checkBox_8 = new JCheckBox("Prozac");
		checkBox_8.setEnabled(false);
		checkBox_8.setBounds(659, 357, 97, 23);
		patients.add(checkBox_8);

		JCheckBox checkBox_9 = new JCheckBox("Vicodin");
		checkBox_9.setEnabled(false);
		checkBox_9.setBounds(658, 380, 97, 23);
		patients.add(checkBox_9);

		JLabel lblFollowUpInstructions = new JLabel("Follow Up Instructions");
		lblFollowUpInstructions.setBounds(409, 410, 210, 14);
		patients.add(lblFollowUpInstructions);

		JTextPane textPane_2 = new JTextPane();
		textPane_2.setText(" ");
		textPane_2.setEditable(false);
		textPane_2.setBounds(409, 431, 353, 40);
		patients.add(textPane_2);

		JButton btnEditRecords = new JButton("Edit Records & Orders");
		btnEditRecords.setBounds(555, 482, 201, 23);
		patients.add(btnEditRecords);

		JLabel lblMessage_2 = new JLabel("Message 3");
		lblMessage_2.setBounds(409, 486, 150, 14);
		patients.add(lblMessage_2);
		addTab("Logout", logout);

		JLabel lblNewLabel = new JLabel("Are you sure?");
		logout.add(lblNewLabel);

		JButton btnNewButton = new JButton("Yes");
		btnNewButton.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				Gui obj = new Gui();
				obj.getFrame().setVisible(true);
				setVisible(false);
				frame.setVisible(false);
				removeAll();
			}
		});
		logout.add(btnNewButton);

		JButton btnNewButton_1 = new JButton("No");
		btnNewButton_1.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				setSelectedIndex(0);
			}
		});
		logout.add(btnNewButton_1);

		frame.getContentPane().add(this);
		frame.pack();
		frame.setVisible(true);
	}
	
	/**
	 * returns the JFrame
	 * @return the GUI frame
	 */
	public JFrame getFrame() {
		return frame;
	}
	
	/**
	 * the main method that runs it in this class
	 * @param args command line arguments
	 */
	public static void main(String[] args) {
		NurseGui nurse = new NurseGui();
		nurse.getFrame();
	}
}
